<?php
include_once('common/header.php');
$intPage		= $objRequest->getParam('page', 1);
$intLimit		= PHOTO_ALBUM_LIMIT;
$intOffset		= ($intPage - 1) * $intLimit;
$intTotal		= 0;
$objPhoto 		= new Photo();
$intTypeA		= 0;
if($AppUI->id > 0) {
	if($AppUI->id == $objUser->id) {
		$intTypeA = 2;
	} else {
		$objVfriendUser		= new Vfriend_User();	
		$intTypeRelation	= $objVfriendUser->getRelationType($objUser->id,$AppUI->id);
		if($intTypeRelation > 1) {
			$intTypeA 		= 1;
		}
	}
	$arrAlbum		= $objPhoto->getAlbumByUserId($AppUI->id);
	$this->view->arrAlbum	= $arrAlbum;
	$this->view->arrPerm	= $arrAlbumPerm;
}
$arrAlbumList	= $objPhoto->getAlbum($objUser->id, $intTypeA, $intOffset, $intLimit, $intTotal);
$this->view->arrResult	= $arrAlbumList;
$this->view->intOffset	= $intOffset;
$this->view->intLimit	= $intLimit;
$this->view->intTotal	= $intTotal;
?>